using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO;
using TextEditor;
using TextEditor.Util;
using ComponentFactory.Krypton.Toolkit;

namespace EditeurSyntaxiqueVocal.Languages.LanguageZ
{
    public partial class PageStart1 : KryptonForm
    {
        public PageStart1()
        {
            InitializeComponent();
            webBrowser1.Url = new Uri(Application.StartupPath + @".\Languages\LanguageZ\kwz\editeur\Page1.htm");
        }

        private void buttonSpecAnyStart_Click(object sender, EventArgs e)
        {            
            PageStart2 pageStart2 = new PageStart2(this);          
            pageStart2.Show();
            Hide();
        }

        private void buttonSpecAnyExit_Click(object sender, EventArgs e)
        {            
           Close();
        }

        private void buttonSpecAny3_Click(object sender, EventArgs e)
        {
            try
            {
                Process.Start("D_Zegour@ini.dz");
            }
            catch (Exception exc)
            {
                MessageBox.Show(exc.Message);
            }
        }

        private void copierToolStripMenuItem_Click(object sender, EventArgs e)
        {
            //CopierVersClipboard(Text, true);
        }

        private void CopierVersClipboard(string text, bool asLine)
        {
            try
            {
                DataObject dataObject = new DataObject();
                dataObject.SetData(DataFormats.UnicodeText, true, text);
                if (asLine)
                {
                    MemoryStream lineSelected = new MemoryStream(1);
                    lineSelected.WriteByte(1);
                    dataObject.SetData("MSDEVLineSelect", false, lineSelected);
                }
                Clipboard.SetDataObject(dataObject, true);
            }
            catch //(Exception exc)
            {
                // MessageBox.Show(exc.Message);
            }
        }        
    }
}